<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<sx:head />
<base href="<%=basePath%>">


</head>

<body>
	<center>
		<div>
			<s:form action="file_update" namespace="/file" method="post">
				<s:hidden name="fileinfo.fileid" value="%{fileinfo.fileid}"></s:hidden>
				<s:hidden name="fileinfo.parentid" value="%{fileinfo.parentid}"></s:hidden>
				<s:hidden name="fileinfo.ifdelete" value="%{fileinfo.ifdelete}"></s:hidden>
				<s:textfield name="fileinfo.filename" label="文件名"
					value="%{fileinfo.filename}"></s:textfield>
				<br />
				<s:hidden name="fileinfo.filepath" value="%{fileinfo.filepath}"></s:hidden>
				位置
				<s:property value="%{fileinfo.filepath}" />
				<br />
				<s:textarea name="fileinfo.remark" label="备注"
					value="%{fileinfo.remark}"></s:textarea>
				<br />
				<hr />
				<s:hidden name="fileinfo.createdate" value="%{fileinfo.createdate}"></s:hidden>
				创建时间
				<s:property value="%{fileinfo.createdate}" />
				<s:hidden name="fileinfo.userinfo.userid"
					value="%{fileinfo.userinfo.userid}"></s:hidden>
				所有者
				<s:property value="%{fileinfo.userinfo.username}" />
				<br />
				
				<s:iterator value="%{#session.filetypeinfoList}">
					<input type="radio" name="fileinfo.filetypeinfo.filetypeid"
						value='<s:property value="%{filetypeid}"/>'
						<s:if test="%{fileinfo.filetypeinfo.filetypeid==filetypeid}">
				        checked="checked"
				      </s:if> />

					<img width="20px" height="20px"
						src='<s:property value="%{filetypeimage}"/>'>
					<span><s:property value="%{filetypesuffix}" /></span>&nbsp;&nbsp;&nbsp;
				   <s:if test="%{(filetypeid-1)%5==0}">
						<br />
					</s:if>
				</s:iterator>
				<hr />
				<table border="1">
					<tr>
						<th></th>
						<th>名称</th>
						<th>大小(KB)</th>
						<th>类型</th>
						<th>创建时间</th>
						<th></th>
					</tr>
					<tr>
						<td><img width="20px" height="20px"
							src='<s:property value="%{accessoryfile.filetypeinfo.filetypeimage}"/>' /></td>
						<td><s:property value="%{accessoryfile.accessoryname}" /></td>
						<td><s:property value="%{accessoryfile.accessorysize}" /></td>
						<td><s:property
								value="%{accessoryfile.filetypeinfo.filetypename}" /></td>
						<td><s:property value="%{accessoryfile.createdate}" /></td>
						<td><s:a
								href="/OAProject/file/acc_downLoad?downLoad=%{accessoryfile.accessorypath}&accessoryid=%{accessoryfile.accessoryid}">下载 </s:a>
							&nbsp;&nbsp; <%-- 				       <sx:a href="/OAProject/file/acc_delete?accessoryid=%{accessoryfile.accessoryid}" targets="mod-right" onclick="return confirm('该操作删除的是文件的附件，文件本身信息不会被删除，是否确定进行此操作？')" >删除</sx:a> --%>

						</td>
					</tr>
				</table>

				<div>
					<iframe src="<s:property value="%{#session.url}"/>/fileManage/upload.jsp" name="upload"
						frameborder="0" width="500px" height="60px"></iframe>
				</div>
				<hr />



				<s:if test="%{#session.where==1}">
				<s:if test="%{#session.userinfo.username==fileinfo.userinfo.username}">
					<s:submit value="保存退出"></s:submit>
				</s:if>
					<s:a
						href="/OAProject/file/tree_findChild?fileid=%{fileinfo.parentid}">不保存退出</s:a>
				</s:if>
				<s:else>
				<s:if test="%{session.userinfo.username==fileinfo.userinfo.username}">
					<sx:submit value="保存退出" targets="mod-right"></sx:submit>
				</s:if>
						<sx:a
							href="/OAProject/file/tree_findChild?fileid=%{fileinfo.parentid}"
							targets="mod-right">不保存退出</sx:a>
				</s:else>
			</s:form>
		</div>
	</center>
</body>
</html>
